home *** CD-ROM | disk | FTP | other *** search
/ PC Home 48 / Fun Clicp Art 5000.iso / r / mbm / 00692_MTR fact.ls < prev    next >
Encoding:
Text File  |  1996-05-11  |  5.4 KB  |  200 lines

  1. factory FBestiole
  2. method mnew NNom, CCode, SStatut, NNumPar, CCodeZoom, CCodePhyl, EEpoque
  3.   instance exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, Nom, Code, Statut, NumPar, CodeZoom, CodePhyl, Epoque
  4.   set Nom to NNom
  5.   set Code to CCode
  6.   set Statut to SStatut
  7.   set NumPar to NNumPar
  8.   set CodeZoom to CCodeZoom
  9.   set CodePhyl to CCodePhyl
  10.   set Epoque to EEpoque
  11.  
  12. method Le_Nom
  13.   return Nom
  14.  
  15. method Le_Code
  16.   return Code
  17.  
  18. method Le_Statut
  19.   return Statut
  20.  
  21. method Le_NumPar
  22.   return NumPar
  23.  
  24. method Le_CodeZoom
  25.   return CodeZoom
  26.  
  27. method Le_CodePhyl
  28.   return CodePhyl
  29.  
  30. method Le_Epoque
  31.   return Epoque
  32.  
  33. factory FBarreChrono
  34. method fleche mode, dat, coul
  35.   if (coul = 0) or (coul = 1) then
  36.     set debut to coul
  37.     set fin to coul
  38.   else
  39.     set debut to 0
  40.     set fin to 1
  41.   end if
  42.   repeat with i = debut to fin
  43.     set monSpr to 46 + i
  44.     puppetSprite(monSpr, 1)
  45.     if mode = 0 then
  46.       set the visible of sprite monSpr to 0
  47.       next repeat
  48.     end if
  49.     set locx to 543 - (dat * 7.20000000000000018)
  50.     set numact to 131 + i
  51.     set the locH of sprite monSpr to locx
  52.     set the visible of sprite monSpr to 1
  53.   end repeat
  54.  
  55. method survol NumSpr, NumActTxt
  56.   global gTraduit
  57.   set numact to the castNum of sprite NumSpr
  58.   set dat to word 1 of the name of cast numact
  59.   set eta to word 2 of the name of cast numact
  60.   if eta = "1" then
  61.     set mess to getAt(gTraduit, 15)
  62.     set monCur to 7
  63.   else
  64.     set mess to getAt(gTraduit, 16)
  65.     set monCur to 7
  66.   end if
  67.   if dat > 1 then
  68.     set mess to mess && dat && getAt(gTraduit, 17)
  69.   else
  70.     if dat = 1 then
  71.       set mess to mess && getAt(gTraduit, 18)
  72.     end if
  73.     if dat = 0.20000000000000001 then
  74.       set mess to mess && "200" && getAt(gTraduit, 19)
  75.     end if
  76.     if dat = 0.035 then
  77.       set mess to mess && "35" && getAt(gTraduit, 19)
  78.     end if
  79.   end if
  80.   me(fleche, 1, dat, 1)
  81.   set the text of cast NumActTxt to " "
  82.   set the textStyle of cast NumActTxt to "plain"
  83.   set the textStyle of cast NumActTxt to "bold"
  84.   set the text of cast NumActTxt to mess
  85.   curseur(monCur)
  86.  
  87. factory FGereBouton
  88. method appuie leNumSpr
  89.   curseur(2)
  90.   if leNumSpr > 0 then
  91.     set nomact to word 1 of the name of cast the castNum of sprite leNumSpr
  92.     put " 0" after nomact
  93.     set the castNum of sprite leNumSpr to the number of cast nomact
  94.     updateStage()
  95.   end if
  96.  
  97. method relache leNumSpr
  98.   if leNumSpr > 0 then
  99.     set nomact to word 1 of the name of cast the castNum of sprite leNumSpr
  100.     put " 1" after nomact
  101.     set the castNum of sprite leNumSpr to the number of cast nomact
  102.     updateStage()
  103.   end if
  104.  
  105. method habille NumSpr, nomact
  106.   set the castNum of sprite NumSpr to the number of cast nomact
  107.  
  108. factory FGereCheckBox
  109. method appuie NumSpr
  110.   curseur(2)
  111.   set numact to the castNum of sprite NumSpr
  112.   set ancnom to the name of cast numact
  113.   set prefixe to word 2 of ancnom
  114.   set nomact to word 1 of ancnom
  115.   if char 1 of prefixe = "1" then
  116.     put " 0" after nomact
  117.   else
  118.     put " 1" after nomact
  119.   end if
  120.   set the castNum of sprite NumSpr to the number of cast nomact
  121.   updateStage()
  122.  
  123. factory FFScope
  124. method mnew act, Spr, lePath
  125.   instance exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, CDPath, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, exitFrame, SprAct, exitFrame, CastAct
  126.   set CastAct to act
  127.   set SprAct to Spr
  128.   puppetSprite(SprAct, 1)
  129.   set the castNum of sprite SprAct to CastAct
  130.   set CDPath to lePath
  131.   set the visible of sprite SprAct to 0
  132.   me(Box, 1, 1, 1, 1)
  133.  
  134. method Restore
  135.   puppetSprite(SprAct, 1)
  136.   set the castNum of sprite SprAct to CastAct
  137.  
  138. method ToStage OnOff
  139.   set the directToStage of cast CastAct to OnOff
  140.  
  141. method preLoad laTaille, leVasY
  142.   if (1024 * laTaille) > the freeBlock then
  143.     set the preloadRam to the freeBlock
  144.     put "LIMITE MEMOIRE : " && laTaille && "Ko demand┼╜s," && the preloadRam / 1024 && "Ko accord┼╜s"
  145.   else
  146.     set the preloadRam to integer(1024 * laTaille)
  147.     put "Preload : " && the preloadRam / 1024 && "Ko allou┼╜s"
  148.   end if
  149.   if laTaille < 1 then
  150.     set the preLoad of cast CastAct to 0
  151.   else
  152.     set the preLoad of cast CastAct to 1
  153.   end if
  154.   if leVasY = 1 then
  155.     preLoadCast(CastAct)
  156.   end if
  157.  
  158. method SetTime laPos
  159.   set the movieTime of sprite SprAct to laPos
  160.  
  161. method GetTime
  162.   return the movieTime of sprite SprAct
  163.  
  164. method Box x1, y1, x2, y2
  165.   spriteBox(SprAct, x1, y1, x2, y2)
  166.  
  167. method visible leMode, leToTheFrame
  168.   set the visible of sprite SprAct to leMode
  169.   if leToTheFrame then
  170.     go(the frame)
  171.   end if
  172.  
  173. method SetCadence laCadcence
  174.   set the movieRate of sprite SprAct to laCadcence
  175.   me(VolAbs)
  176.  
  177. method GetCadence
  178.   return the movieRate of sprite SprAct
  179.  
  180. method unLoad
  181.   me(SetCadence, 0)
  182.   me(visible, 0)
  183.   me(Box, 1, 1, 1, 1)
  184.   me(preLoad, 0.10000000000000001, 0)
  185.   unLoadCast(CastAct)
  186.  
  187. method VolRel lePrCent
  188.   set monVol to the volume of sprite SprAct
  189.   set monVol to monVol + (lePrCent * monVol / 100)
  190.   set the volume of sprite SprAct to monVol
  191.  
  192. method VolAbs
  193.   global gVolVid
  194.   if the sound of cast CastAct = 1 then
  195.     set the volume of sprite SprAct to gVolVid
  196.   end if
  197.  
  198. method Duree
  199.   return the duration of cast CastAct
  200.